package top.hidoctor.auscultation.adapter;

import android.graphics.Color;
import android.support.v7.widget.RecyclerView;
import android.view.Gravity;
import android.view.ViewGroup;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.tang.util.DensityUtil;

import java.util.List;

import top.hidoctor.auscultation.R;

public class SekaAdapter2 extends BaseQuickAdapter<String> {
    private final List<String> list;

    public SekaAdapter2(int layoutResId, List<String> data) {
        super(layoutResId, data);
        list = data;
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        TextView tvScale = helper.getView(R.id.tv);
        tvScale.setText(item);
        RecyclerView.LayoutParams params = new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                DensityUtil.dip2px(mContext, 180) / (list.size()));
        tvScale.setLayoutParams(params);
        tvScale.setTextColor(Color.WHITE);
    }
}
